import nomalPop from './nomal.vue';
import Vue from 'vue';
import store from '@/store/index';

export const openNomalPop = (pop: Vue | null) => {
  pop && pop.$el.remove();
  const NomalPopConstructor = Vue.extend(nomalPop);
  const instance = new NomalPopConstructor({
    propsData: {},
    store
  }).$mount();
  document.body.appendChild(instance.$el);
  instance.$on('close', () => {
    instance.$el.remove();
  });
  return instance;
};
